<%@ page language="java" pageEncoding="UTF-8"%>
<link rel="stylesheet" type="text/css" href="${ctx }/extjs/ext/resources/css/ext-all.css"/>
<script type="text/javascript" src="${ctx }/extjs/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="${ctx }/extjs/ext/ext-all.js"></script>
<script type="text/javascript" src="${ctx }/extjs/ext/src/locale/ext-lang-zh_CN.js"></script>
<style type= "text/css">
	.x-selectable, .x-selectable * {
		-moz-user-select: text! important;
		-khtml-user-select: text! important;
	}
</style> 
<script type="text/javascript">
	//设置AJAX请求超时时长，单位为毫秒。
	Ext.Ajax.timeout = 5 * 60 * 1000;
	Ext.BLANK_IMAGE_URL = contextPath + '/extjs/ext/resources/images/default/s.gif';
	Ext.QuickTips.init();
	Ext.Ajax.on('requestexception', function(connection, response, options) {
		Common.parseFailureResponse(response);
	});	
	Ext.data.DataProxy.on('exception', function(proxy, type, action, 
			options, response, arg) {
		if (type == 'remote') {
			Ext.Msg.alert('系统提示', response.raw.message);
		}
	});
	
	if  (!Ext.grid.GridView.prototype.templates) {
		Ext.grid.GridView.prototype.templates = {};
	}
	Ext.grid.GridView.prototype.templates.cell =  new  Ext.Template(
	     '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} x-selectable {css}" style="{style}" tabIndex="0" {cellAttr}>',
	     '<div class="x-grid3-cell-inner x-grid3-col-{id}" {attr}>{value}</div>',
	     '</td>'
	); 
</script>